﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using HNCDataSetTableAdapters;

public partial class UserControl_menu : System.Web.UI.UserControl
{
    CategoryTableAdapter cate = new CategoryTableAdapter();
    ProductsTableAdapter pro = new ProductsTableAdapter();
    InfoTableAdapter info = new InfoTableAdapter();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ////logo
            ////DataTable dt3 = info.GetInfoByID(1);
            ////imgLogo.Src = "~/UserUploads/Banner/" + dt3.Rows[0]["Image"].ToString();
            ////imgLogo.Alt = dt3.Rows[0]["Title"].ToString();

            ////product
            //DataTable dt = cate.GetCateByParentID(3);
            //rptProduct.DataSource = dt;
            //rptProduct.DataBind();

            //// service
            //DataTable dt1 = cate.GetCateByParentID(7);
            //rptService.DataSource = dt1;
            //rptService.DataBind();

            //// about
            //DataTable dt2 = pro.GetProductByCateID(2);
            //prtAbout.DataSource = dt2;
            //prtAbout.DataBind();
        }
    }
    //protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    //{
    //    string str = "";
    //    if (txtSearch.Value == "")
    //    {
    //        str = "all";
    //    }
    //    else
    //    {
    //        str = txtSearch.Value;
    //    }

    //    Response.Redirect("tim-kiem-" + str + ".html");
    //}
}